from main.model.logic.system import System

MS_X_CYCLE = 500
ROUN_ROBIN_ENABLE = True
PROGRAM_AMOUNT = 4
LOG = False

class CloneApp():
    def __init__(self):
        self.system = System(MS_X_CYCLE, ROUN_ROBIN_ENABLE, LOG).with_programs(PROGRAM_AMOUNT).power_on()

    def execute(self):
        for program_index in range (0, PROGRAM_AMOUNT ):
            self.system.kernel.execute("program a#" + str(program_index), [])
            self.system.kernel.execute("program b#" + str(program_index), [1])
        
        while(True):
            n = raw_input("program:")
            self.system.kernel.execute("program a#" + n, [])